<html>
<head>
<style type='text/css'>
body {
   background-color: white;
   margin: 1em 2em 1em 2em;
   font-family: Sans-Serif;
   color: #002;
   line-height: 140%;
   font-size: 12px;
}

h4 {
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
}

h5 {
    font-size: 100%;
    font-style: italic;
    font-weight: normal;
}

pre {
   background-color: #eee;
   padding: 0.5em 0.5em 0.5em 2em;
}

@media print {
   pre {word-wrap:break-word; width:100%;}
} 

ul li,
ol li {
   padding-left: 0.3em;
   /*text-indent: -2em;*/
   margin-bottom: 0.5em;
}

em {
   font-style: normal;
   font-weight: bold;
   text-decoration: underline;
   color: #c40;
}

code {
   font-family: Monospace;
   font-size: 100%;
   color: #c40;
}

a, a * {
   text-decoration: underline;
   color: blue;
   /* border: 0.5px solid #aaa;
   white-space: nowrap;
   padding-right: 0.1em;
   padding-left: 0.1em;
   padding-bottom: -5px; */
}

a code {
   color: blue;
}

img {
   position: relative;
   bottom: -4px;
}

div.headline {
   font-weight: bold;
   font-size: 110%;
}

div.copyright {
   margin-top: 1em;
   border-top: 1px solid black;
   padding-top: 0.5em;
}

div.iris_headline {
   border-bottom: 1px solid black;
   padding-bottom: 0.3em;
}

.LaTeX {
   font-family: Monospace;
   font-size: 100%;
   border: 1px solid #060;
   color: #060;
}

code.LaTeX {
   background-color: white;
   padding: 0.5em 0.5em 0.5em 2em;
}
</style>
</head>

<body>
<div class="iris_headline">IRIS Toolbox Reference Manual</div>




<h2 id="dbase/xls2csv">xls2csv</h2>
<div class="headline">Convert XLS file to CSV file</div>

<h4 id="syntax">Syntax</h4>
<pre><code>xls2csv(InpFile)
xls2csv(InpFile,OutpFile,...)</code></pre>
<h4 id="input-arguments">Input arguments</h4>
<ul>
<li><p><code>InpFile</code> [ char ] - Name of an XLS input file that will be converted to CSV.</p></li>
<li><p><code>OutpFile</code> [ empty | char ] - Name of the CSV output file; if not supplied or empty, the CSV file name will be derived from the XLS input file name.</p></li>
</ul>
<h4 id="options">Options</h4>
<ul>
<li><code>'sheet='</code> [ numeric | char | <em><code>1</code></em> ] - Worksheet in the XLS file that will be saved; can be either the sheet number or the sheet name.</li>
</ul>
<h4 id="description">Description</h4>
<p>This function calls a third-party JavaScript (courtesy of Christopher West). The script uses an MS Excel application on the background, and hence MS Excel must be installed on the computer.</p>
<p>Only one worksheet at a time can be saved to CSV. By default, it is the first worksheet found in the input XLS file; use the option <code>'sheet='</code> to control which worksheet will be saved.</p>
<p>See also $irisroot/+thirdparty/xls2csv.js for copyright information.</p>
<h4 id="example-1">Example 1</h4>
<p>Save the first worksheets of the following XLS files to CSV files.</p>
<pre><code>xls2csv(&#39;myDataFile.xls&#39;);
xls2csv(&#39;C:\Data\myDataFile.xls&#39;);</code></pre>
<h4 id="example-2">Example 2</h4>
<p>Save the worksheet named 'Sheet3' to a CSV file; the name of the CSV file will be <code>'myDataFile.csv'</code>.</p>
<pre><code>xls2csv(&#39;myDataFile.xls&#39;,[],&#39;sheet=&#39;,&#39;Sheet3&#39;);</code></pre>
<h4 id="example-3">Example 3</h4>
<p>Save the second worksheet to a CSV file under the name <code>'myDataFile_2.csv'</code>.</p>
<pre><code>xls2csv(&#39;myDataFile.xls&#39;,&#39;myDataFile_2.csv,&#39;sheet=&#39;,2);</code></pre>

</body>
<div class="copyright">IRIS Toolbox. Copyright &copy; 2007&#8212;2012 Jaromir Benes.</div>
</html>
